package com.xja.boke.exception;


import com.xja.boke.utils.PageResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class StuException {
    private Logger logger = LoggerFactory.getLogger(com.xja.boke.exception.StuException.class);
    @ExceptionHandler
    public PageResult exception(Exception e){
        logger.info("异常",e);
        return PageResult.error("执行功能飞走了");
    }
}
